<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="javascript/ajax/prototype.js"></script>
<link rel="stylesheet" type="text/css" href="modules/IShopStore/pnjavascript/ddtabmenu/ddtabmenufiles/ddcolortabs_blue.css" />
</style>

<style type="text/css">@import "modules/IShopStore/pnjavascript/jquery.datePicker/jquery.datepick.css";</style> 
<script type="text/javascript" src="modules/IShopStore/pnjavascript/jquery.datePicker/jquery.datepick.js"></script>

<script type="text/javascript">
  function validateForm(form) {

    //Check bank name
    var bank_name = document.getElementById("form_payment_bank_name_");
    if (bank_name.selectedIndex == 0) {
        alert("Please select bank name.");
        bank_name.style.background = 'PowderBlue';
        bank_name.focus();
        return false;
    }

    //Check payer name
    var payer_name = document.getElementById("form_payer_name_");
    if (payer_name.value == '') {
        alert("กรุณาใส่ชื่อผู้จ่าย");
        payer_name.style.background = 'PowderBlue';
        payer_name.focus();
        return false;
    }
    //Check pay time
    var pay_time = document.getElementById("form_pay_time_");
    if (pay_time.value == '') {
        alert("กรุณาระบุเวลาที่ชำระ(ประมาณ)");
        pay_time.style.background = 'PowderBlue';
        pay_time.focus();
        return false;
    }

    //Check pay
    var pay = document.getElementById("form_pay_");
    if (pay.value == '') {
        alert("กรุณาใส่จำนวนเงินที่ชำระ");
        pay.style.background = 'PowderBlue';
        pay.focus();
        return false;
    }

    //Check order id
    var order_id = document.getElementById("form_order_id_");
    if (order_id.selectedIndex == 0) {
        alert("กรุณาใส่รหัสใบสั่งจอง");
        order_id.style.background = 'PowderBlue';
        order_id.focus();
        return false;
    }


    //Check payment bank account no
    var account_no = document.getElementById("form_payment_bank_account_no_");
    if (account_no.selectedIndex == 0) {
        alert("Please Enter account no.");
        account_no.style.background = 'PowderBlue';
        account_no.focus();
        return false;
    }


  }
</script>




<h4 class="innodocument-head">แจ้งชำระเงิน</h4>

<form id='form' class='form' action="<!--[pnmodurl modname='IShopStore' type='adminform' func='submit' ctrl='Inform']-->" method="post" enctype="multipart/form-data" onsubmit="return validateForm(this)">
<input type="hidden" name="form[id]" value="<!--[$_GET.id]-->" />

<TABLE width='80%' border="0" class="innoadvert-table">
<TR  >
  <TD class='td-label' width='30%'>ชำระเข้าบัญชี</TD>
  <TD>
      <!--[selector_object_array modname="IShopStore" 
            class="Payment" 
            field="id" 
            displayField="payment_bank_name"  
            displayField2="payment_bank_account_no"
            name="form[payment_id]" 
            selectedValue=$form.payment_id 
      ]-->
  </TD>
</TR>
<tr>
  <td class='td-label' >ชื่อผู้ชำระเงิน</td>
  <td class='td-data' ><input name="form[payer_name]" 
                 id="form_payer_name_" 
                 type="text" 
                 size="40" 
                 value="<!--[$form.payer_name]-->" /></td>
</tr>
<tr>
  <td class='td-label' >วันที่ชำระเงิน</td>
  <td class='td-data' ><!--[html_select_date field_order='DMY' prefix='pay_' ]--></td>
</tr>
<tr>
  <td class='td-label' >เวลา (ประมาณ)</td>
  <td class='td-data' >					
          <select name="form[pay_time]" id="form_pay_time_">
						<option value="">- กรุณาระบุเวลา -</option>
						<option value="0">00:00 น.</option>
						<option value="1">01:00 น.</option>
						<option value="2">02:00 น.</option>

						<option value="3">03:00 น.</option>
						<option value="4">04:00 น.</option>
						<option value="5">05:00 น.</option>
						<option value="6">06:00 น.</option>
						<option value="7">07:00 น.</option>
						<option value="8">08:00 น.</option>

						<option value="9">09:00 น.</option>
						<option value="10">10:00 น.</option>
						<option value="11">11:00 น.</option>
						<option value="12">12:00 น.</option>
						<option value="13">13:00 น.</option>
						<option value="14">14:00 น.</option>

						<option value="15">15:00 น.</option>
						<option value="16">16:00 น.</option>
						<option value="17">17:00 น.</option>
						<option value="18">18:00 น.</option>
						<option value="19">19:00 น.</option>
						<option value="20">20:00 น.</option>

						<option value="21">21:00 น.</option>
						<option value="22">22:00 น.</option>
						<option value="23">23:00 น.</option>
					</select>
   
  </td>
</tr>
<tr>
  <td class='td-label' >จำนวนเงินที่ชำระ</td>
  <td class='td-data' >
      <input name="form[pay]" 
                 id="form_pay_" 
                 type="text" 
                 size="10" 
                 value="<!--[$form.pay]-->" /> บาท
  </td>
</tr>
<tr >
  <td colspan="2" >&nbsp; </td>
  </tr>
<tr>
  <td class='td-label' >เลขที่ใบสั่งซื้อ</td>
  <td class='td-data' >
      <input name="form[order_id]" 
                 id="form_order_id_" 
                 type="text" 
                 size="15" 
                 value="<!--[$form.order_id]-->" />
  </td>
</tr>
<tr>
  <td class='td-label' >รายละเอียดเพิ่มเติม</td>
  <td class='td-data' >
      <textarea name="form[detail]" rows="5" cols="50"><!--[$form.detail]--></textarea>
  </td>
</tr>
<TR>
  <TD></TD>
  <TD><!--[if $form.id]--><INPUT TYPE="submit" value='Update' name='Update' type="submit" >&nbsp;&nbsp;<!--[/if]-->
      <!--[if $form.id==null]--><INPUT TYPE="submit" value='Submit' name='Submit' type="submit" >&nbsp;&nbsp;<!--[/if]--></TD>
</TR>
</TABLE>

</form>
